/*************************************************
 * 
 * Copyright by Bruno Eberhard
 * 
 * Created on 29.07.2005
 *
 *************************************************/
package fightplan.views;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import com.jgoodies.binding.value.ValueModel;
import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.layout.FormLayout;

import fightplan.views.tables.SheetsTable;

@SuppressWarnings("serial")
public class SheetsPanel extends JPanel {

	public SheetsPanel(ValueModel tournament) {
		setLayout(new BorderLayout());

		final SheetsTable table = new SheetsTable(tournament);

		FormLayout layout = new FormLayout("left:max(40dlu;p), 4dlu, pref:grow(1), 7dlu, ", "20dlu, 100px:grow:fill");

		DefaultFormBuilder builder = new DefaultFormBuilder(layout);

		builder.setDefaultDialogBorder();

		builder.appendSeparator("Kategorien");
		builder.append(table, 3);

		add(builder.getPanel(), BorderLayout.CENTER);
	}

}
